package net.tensor.skynet.api.controller.user

import net.tensor.skynet.api.service.user.UserServiceImpl
import net.tensor.skynet.common.user.entity.User
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("/user/querySaveOne")
class UserQuerySaveController {

    @Autowired
    private lateinit var userService: UserServiceImpl

    @PostMapping
    fun invoke(@RequestBody param: User): Any {
        return userService.addOne(user = param)
    }
}